import java.math.BigInteger;

public class factorial {

    static BigInteger factorial_(BigInteger n)
    {
        if (n.compareTo(BigInteger.ONE) == 0) {
            return BigInteger.ONE;
        }
        else {
            return n.multiply(factorial_(n.subtract(BigInteger.ONE)));
        }
    }

    public static void main(String[] argv)
    {
        System.out.println(factorial_(new BigInteger(argv[0])));
    }
}
